package com.logo.egitim.crm.service;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;

import javax.ejb.Stateless;

@Stateless
public class OrnekService implements Serializable{

	
	public void dosyaKaydet(){
		InputStream input = null;
		okumaMetodu(input);
	}

	private void okumaMetodu(InputStream input) {
		try {
			input = new FileInputStream("/Users/melih/calisma_alani/ornek.txt");
			
			int i_degeri = input.read();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		finally{
			try {
				input.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
	
	public int hesaplama(int x, int y){
		System.out.println("hesaplama calisti...");
		return x + y;
	}
}
